-- card: 3368 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 2699 -- name: -- part 1 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=316 top=44 right=66 bottom=400 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Install it ----- HyperTalk script ----- on mouseUp push card set lockMessages to true put the script of btn "on doMenu script" into myScript put char 1 to offset(return&return,myScript) of myScript into myScript put the long name of this stack into source delete first word of source -- "stack" delete first char of source -- quote delete last char of source -- quote go to stack "the target stack" put the script of this stack into dstScript if dstScript contains "on doMenu" then abort "“on doMenu” already exists in stack script!" put the long name of this stack into dest delete first word of dest -- "stack" delete first char of dest -- quote delete last char of dest -- quote if source = dest then abort "Installation cancelled." answer "Do you have ResCopy in your home stack?" with "Yes" or "No" if it is "Yes" then installResources source,dest else answer "Move XCMD & STR# resources using ResEdit." put return & dstScript after myScript set the script of this stack to myScript answer "Installation successful." pop card end mouseUp on installResources source,dest resCopy source,dest,"XCMD",19831 if the result is not empty then abort "Error installing XCMD resource." resCopy source,dest,"STR#",19831 if the result is not empty then abort "Error installing string (STR#) resource." end installResources on abort theText answer theText pop card exit to HyperCard end abort -- part 2 (button) -- low flags: 00 -- high flags: 8002 -- rect: left=408 top=254 right=276 bottom=496 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: on doMenu script ----- HyperTalk script ----- on doMenu theItem if (theItem is "Paste Card") and (the optionKey is down) then answer "The card will be pasted with current bkgnd." with "OK" or "Cancel" if it is not "OK" then exit doMenu pickupBkgnd --call the XCMD, converting contents of the clipboard get the result if it is not empty then answer it exit doMenu end if end if pass doMenu end doMenu --the following handler is not copied by the installation button on mouseUp edit script of me end mouseUp -- part contents for background part 1 ----- text ----- Click the button above to install the PickUpBkgnd XCMD into the stack of your choice. The installation adds a “on doMenu” handler to the stack script of the target stack so that you can use the option-paste feature. If you have ResCopy, the XCMD and STR# resources will be copied. Otherwise, you will have to copy the resources with ResEdit or something like it. -- part contents for background part 9 ----- text ----- Installation